import {ref} from "vue";
import dayjs from 'dayjs'
import {JCrudColumnProps} from "../components/crud/crud";

const columns = ref<JCrudColumnProps[]>([
    {
        title: "#",
        dataIndex: "id",
    },
    {
        title: "自动完成",
        dataIndex: "auto-complete",
        type: "auto-complete",
        props: {
            options: [
                {
                    label: '选中',
                    value: 1,
                },
                {
                    label: '未选中',
                    value: 0,
                },
            ],
        },
    },{
        title: "级联选择",
        dataIndex: "cascader",
        type: "cascader",
        props: {
            options: [
                {
                    label: '选中',
                    value: 1,
                },
                {
                    label: '未选中',
                    value: 0,
                },
            ],
        },
    },{
        title: "多选框",
        dataIndex: "checkbox-group",
        type: "checkbox-group",
        props: {
            options: [
                {
                    label: '选中',
                    value: 1,
                },
                {
                    label: '未选中',
                    value: 0,
                },
            ],
        },
    },
    {
        title: "选择器",
        dataIndex: "select",
        type: "select",
        props: {
            options: [
                {
                    label: '选中',
                    value: 1,
                },
                {
                    label: '未选中',
                    value: 0,
                },
            ],
        },
    }
]);

const datasource = [
    {
        id: 1,
        name: '第一个任务',
        callNo: 2000,
        desc: '一生那么短，遗忘又那么漫长',
        status: 1,
        updatedAt: dayjs().format('YYYY-MM-DD HH:mm'),
    }
]
export default {columns, datasource}